package com.xh.petdogexpert.base;

public class BaseException extends Exception{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	Object errorMsg;
	
	Integer errorType;
	
	public final static int COMMON_ERROR = 0;
	public final static int UNKNOW = 1;
	public final static int FORM_VALUDATE = 2;
	public final static int HTML_ERROR = 3; //modelAndView 返回出错
	
	
	public Object getErrorMsg() {
		return errorMsg;
	}
	
	public void setErrorMsg(Object errorMsg) {
		this.errorMsg = errorMsg;
	}
	
	public Integer getErrorType() {
		return errorType;
	}
	
	public BaseException(Object errorMsg) {
		this.errorMsg = errorMsg;
	}
	
	public BaseException(String message) {
		super(message);
		this.errorMsg = message;
		this.errorType = COMMON_ERROR;
	}
	
	public BaseException(Object errorMsg, Integer errorType) {
		this.errorMsg = errorMsg;
		this.errorType = errorType;
	}
}
